<template>
  <div>
    <el-page-header @back="goBack"  style="margin-bottom: 50px"></el-page-header>
    <el-form :model="list" label-width="80px">
      <el-form-item label="公司">
        <el-input style="width: 500px" type="text" v-model.trim="list.Eid"></el-input>
      </el-form-item>

      <el-form-item label="薪资">
        <el-input style="width: 500px" type="text" v-model.trim="list.Salary"></el-input>
      </el-form-item>
      <el-form-item label="工作地">
        <el-input style="width: 500px" type="text" v-model.trim="list.Address"></el-input>
      </el-form-item>
      <el-form-item label="职位">
        <el-input style="width: 500px" type="text" v-model.trim="list.Zname"></el-input>
      </el-form-item>
      <el-form-item label="待遇">
        <el-input style="width: 500px" type="text" v-model.trim="list.Treatment"></el-input>
      </el-form-item>
      <el-form-item label="状态">
        <el-input
          style="width: 500px"
          placeholder="0为未审核，1为已审核"
          type="text"
          v-model.trim="list.state"
        ></el-input>
      </el-form-item>

      <el-form-item>
        <el-button type="primary" @click="storage">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: {
        Eid: "",
        Salary: "",
        Address: "",
        Zname: "",
        Treatment: "",
        state: "",
      },
    };
  },
  created() {},
  methods: {
    goBack() {
      this.$router.back();
    },
    storage() {
      this.$http({
        url: "enterprise/recruit/add",
        method: "post",
        params: this.list,
      }).then((res) => {
        this.$message({
          message: res.msg,
          type: res.code == 200 ? "success" : "error",
        });
        if (res.code == 200) {
          this.list = {
            Eid: "",
            Salary: "",
            Address: "",
            Zname: "",
            Treatment: "",
            state: "",
          };
        }
      });
    },
  },
};
</script>

<style>
</style>